import Mock from 'mockjs'

const token = Mock.mock({
  code: 200,
  data: {
    token: 'wyl'
  }
})

const data = Mock.mock({
  code: 200,
  'data|10': [
    {
      'id|+1': 0,
      'name|1-3': 'wang',
      'age|10-100': 20,
      'ifShow|1-2': true
    }
  ]
})

const userInfo = Mock.mock({
  code: 200,
  data: {
    nickName: '云淡风轻',
    role: 'admin'
  }
})
Mock.mock('/api/token', 'post', token)
Mock.mock('/api/data', 'post', data)
Mock.mock('/api/getUserInfo', 'post', userInfo)
